<?php 
include ( PATH . '/includes/common_header.php' );
include ( PATH . '/templates/' . $cookie_template . '/tables.php'); 

if (isset($initiate_maps) && $initiate_maps == 'ON') {
 include(PATH . '/includes/functions/maps.php');
 $map = new Map();
 $map->setAPIKey($conf['google_key']);
}
?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en" dir="<?php echo $lang['Direction']; ?>">
<head>
 <meta http-equiv="Content-Type" content="text/html; charset=<?php echo $lang['Encoding']; ?>" />
 <meta http-equiv="Content-Style-Type" content="text/css" />
 <meta name="author" content="phpMyRealty.com" />
 <meta name="copyright" content="Copyright, phpMyRealty.com. All rights reserved." />

 <meta name="title" content="<?php if (isset($meta_title)) echo $meta_title; else echo $conf['title_meta']; ?>" />
 <meta name="description" content="<?php if (isset($meta_description)) echo $meta_description; else echo $conf['description_meta']; ?>" />
 <meta name="keywords" content="<?php if (isset($meta_keywords)) echo $meta_keywords; else echo $conf['keywords_meta']; ?>" />

 <meta name="robots" content="<?php echo $conf['robots_meta']; ?>" />
 <meta name="revisit-after" content="7 days" />
 <link rel="stylesheet" href="<?php echo URL . '/templates/' . $cookie_template . '/style.css'; ?>" type="text/css" />
 <link rel="stylesheet" href="<?php echo URL . '/templates/' . $cookie_template . '/tabcontent.css'; ?>" type="text/css" />
 <link rel="stylesheet" href="<?php echo URL; ?>/includes/lightbox/css/lightbox.css" type="text/css" />
 <link rel="stylesheet" href="<?php echo URL; ?>/includes/dhonishow/dhonishow.css" type="text/css" media="screen" />
 <link rel="alternate" type="application/rss+xml" title="RSS" href="<?php echo URL . '/rss.php'; ?>" />
<?php
 include ( PATH . '/includes/js.php' );
 if (isset($initiate_maps) && $initiate_maps == 'ON') {
   $map->printGoogleJS();
 }
 if (isset($initAjax) && $initAjax)
  $xajax->printJavascript(); 
?>
 <title><?php echo $title; ?></title>
</head>
<body <?php if (isset($onload)) echo $onload; ?>>
<!-- Header : start -->

<div align="center">

<table width="70%" cellpadding="2" cellspacing="0" border="0">
 <tr>
  <td width="100%" align="center" valign="top" bgcolor="#DFE1E2">

<table width="100%" cellpadding="0" cellspacing="0" border="0">
 <tr>
  <td width="100%" height="314" align="left" valign="top" background="<?php echo URL . '/templates/' . $cookie_template; ?>/images/background.gif" alt=""> 

     <table width="100%" cellpadding="0" cellspacing="0" border="0">
       <tr>
         <td width="100%" height="72" align="left" valign="top">

             <table width="100%" cellpadding="0" cellspacing="0" border="0">
               <tr>
                 <td width="25%" height="72" align="left" valign="top">
                   <img src="<?php echo URL . '/templates/' . $cookie_template; ?>/images/logo.jpg" alt=""><br>
                 </td>

                 <td width="25%" height="72" align="left" valign="top">
                   <img src="<?php echo URL . '/templates/' . $cookie_template; ?>/images/top.jpg" alt=""><br>
                 </td>

                 <td width="35%" height="72" align="left" valign="middle" background="<?php echo URL . '/templates/' . $cookie_template; ?>/images/top2.jpg" alt="">

                   <table width="100%" cellspacing="1" cellpadding="0" border="0">
                      <tr>
                                     
                         <td width="3%" align="right" valign="middle" style="padding:1px 1px 1px 8px; ">
                           <img src="<?php echo URL . '/templates/' . $cookie_template; ?>/images/arrow.gif" alt=""><br>
                         </td>

                         <td width="33%" align="left" valign="middle" style="padding:1px 1px 1px 1px; ">
                           <a href="<?php echo URL ; ?>/"><font style="color:#ffffff; font-size:8pt; font-family:Verdana"><?php echo $lang['Menu_Home']; ?></font></a>
                         </td>

                         <td width="3%" align="right" valign="middle" style="padding:1px 1px 1px 8px; ">
                           <img src="<?php echo URL . '/templates/' . $cookie_template; ?>/images/arrow.gif" alt=""><br>
                         </td>

                         <td width="33%" align="left" valign="middle" style="padding:1px 1px 1px 1px; ">
                           <a href="<?php echo URL ; ?>/advsearchform.php"><font style="color:#ffffff; font-size:8pt; font-family:Verdana"><?php echo $lang['Menu_Search']; ?></font></a>
                         </td>

                         <td width="3%" align="right" valign="middle" style="padding:1px 1px 1px 8px; ">
                           <img src="<?php echo URL . '/templates/' . $cookie_template; ?>/images/arrow.gif" alt=""><br>
                         </td>

                         <td width="33%" align="left" valign="middle" style="padding:1px 1px 1px 1px; ">
                           <a href="<?php echo URL ; ?>/mail.php"><font style="color:#ffffff; font-size:8pt; font-family:Verdana"><?php echo $lang['Menu_Contact_Us']; ?></font></a>
                         </td>

                      </tr>
                   </table>
                 </td>

                 <td width="15%" height="72" align="left" valign="top">
                   <br>
                 </td>
               </tr>
            </table>
          </td>
        </tr>

        <tr>
         <td width="100%" height="242" align="left" valign="top">

            <table width="100%" cellpadding="0" cellspacing="0" border="0">
             <tr>
                <td width="25%" align="left" height="242" valign="top">

                   <table width="100%" cellpadding="0" cellspacing="0" border="0">
                     <tr>
                       <td width="100%" height="123" align="left" valign="top">
                         <img src="<?php echo URL . '/templates/' . $cookie_template; ?>/images/house_1.jpg" alt=""><br>
                       </td>
                     </tr>

                     <tr>
                       <td width="100%" height="119" align="left" valign="top">
                         <img src="<?php echo URL . '/templates/' . $cookie_template; ?>/images/house_2.jpg" alt=""><br>
                       </td>
                     </tr>

                   </table>

                </td>

                <td width="75%" align="left" valign="top" height="242">

                   <table width="100%" cellpadding="0" cellspacing="0" border="0">
                     <tr>
                       <td width="100%" height="242" align="left" valign="top">
                        <?php include ( PATH . '/templates/' . $cookie_template . '/searchform2.php' ); ?>
                       </td>
                     </tr>

                   </table>

                </td>

             </tr>
           </table>

 
          </td>
      </tr>
     </table>
  </td>
 </tr>
</table>

<table width="100%" cellpadding="0" cellspacing="0" border="0" >
 <tr>
  <td width="10" height="35" align="left" valign="top">
   <img src="<?php echo URL . '/templates/' . $cookie_template; ?>/images/menu-left.gif" alt=""><br>
  </td>

  <td width="100%" height="35" align="left" valign="top" background="<?php echo URL . '/templates/' . $cookie_template; ?>/images/menu.gif" alt="">

   <table width="100%" cellpadding="0" cellspacing="0" border="0">
    <tr>
     <td width="95%" align="left" valign="middle">
      <?php include (PATH . '/templates/' . $cookie_template . '/menu2.php'); ?>
     </td>
     <td width="5%" align="right" height="30" valign="middle">
      <a href="<?php echo URL; ?>/rss.php" target="new"><img src="<?php echo URL . '/templates/' . $cookie_template; ?>/images/xml.gif" alt="RSS Feed" border="0"></a>
     </td>
    </tr>
   </table>

  </td>

  <td width="10" height="35" align="right" valign="top">
   <img src="<?php echo URL . '/templates/' . $cookie_template; ?>/images/menu-right.gif" alt=""><br>
  </td>
 </tr>
</table>

   <table width="100%" cellpadding="5" cellspacing="0" border="0">
    <tr>

     <td width="23%" align="center" valign="top">

<!-- Options cell on the right : start -->

      <?php if (!isset($_SESSION['login']))include (PATH . '/templates/' . $cookie_template . '/login.php'); ?>
      
      <?php
      
        // If quick search is enabled
  		if ($conf['quick_search'] == 'ON')
     		include (PATH . '/templates/' . $cookie_template . '/searchform.php');
     		
       ?>
      <?php include (PATH . '/templates/' . $cookie_template . '/menu.php'); ?>
      <?php
      
  		// If settings box is enabled
  		if ($conf['settings_box'] == 'ON')
      		include (PATH . '/options.php');
      
      ?>
      <?php
       
  		// If agents' online is enabled
  		if ($conf['online_box'] == 'ON')
      		include (PATH . '/online.php');
      
      ?>

<!-- Options cell on the right : stop -->

     </td>

     <td width="77%" valign="top">

      <table width="100%" cellpadding="0" cellspacing="0" border="0">
       <tr>
        <td align="center" valign="middle">


         <?php include ( PATH . '/banner.php' ); ?>

<!-- Main Content table : start -->

<!-- Header : stop -->
<?php
// Don't display the search form twice  
$main_search_tabs = array(
//    'tab-search',
    'tab-propertyType',
    'tab-priceRange',
);
?>